package com.issue.system.service.impl;

import java.util.List;
import com.issue.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.issue.system.mapper.ChildStatusMapper;
import com.issue.system.domain.ChildStatus;
import com.issue.system.service.IChildStatusService;

/**
 * Child StatusService业务层处理
 * 
 * @author system
 * @date 2024-10-15
 */
@Service
public class ChildStatusServiceImpl implements IChildStatusService 
{
    @Autowired
    private ChildStatusMapper childStatusMapper;

    /**
     * 查询Child Status
     * 
     * @param id Child Status主键
     * @return Child Status
     */
    @Override
    public ChildStatus selectChildStatusById(Long id)
    {
        return childStatusMapper.selectChildStatusById(id);
    }

    /**
     * 查询Child Status列表
     * 
     * @param childStatus Child Status
     * @return Child Status
     */
    @Override
    public List<ChildStatus> selectChildStatusList(ChildStatus childStatus)
    {
        return childStatusMapper.selectChildStatusList(childStatus);
    }

    /**
     * 新增Child Status
     * 
     * @param childStatus Child Status
     * @return 结果
     */
    @Override
    public int insertChildStatus(ChildStatus childStatus)
    {
        childStatus.setCreateTime(DateUtils.getNowDate());
        return childStatusMapper.insertChildStatus(childStatus);
    }

    /**
     * 修改Child Status
     * 
     * @param childStatus Child Status
     * @return 结果
     */
    @Override
    public int updateChildStatus(ChildStatus childStatus)
    {
        childStatus.setUpdateTime(DateUtils.getNowDate());
        return childStatusMapper.updateChildStatus(childStatus);
    }

    /**
     * 批量删除Child Status
     * 
     * @param ids 需要删除的Child Status主键
     * @return 结果
     */
    @Override
    public int deleteChildStatusByIds(Long[] ids)
    {
        return childStatusMapper.deleteChildStatusByIds(ids);
    }

    /**
     * 删除Child Status信息
     * 
     * @param id Child Status主键
     * @return 结果
     */
    @Override
    public int deleteChildStatusById(Long id)
    {
        return childStatusMapper.deleteChildStatusById(id);
    }
}
